package com.ldm.rtsp.sunny;

import android.view.Surface;


public class FpvJni {
	private static JniStaticMethodCallback jniCallback;
	static {
		System.loadLibrary("live555");
		System.loadLibrary("fpv_jni");
	}

	public void setCallbacks(JniStaticMethodCallback callback) {
		jniCallback = callback;
	}
	  
	public native int FpvJni_Init(String ip_addr);

	public native int FpvJni_DeInit();

	public native int FpvJni_StartPreview(Surface surface, String ip_addr);

	public native int FpvJni_StopPreview();

	public static void callBackRecvFrame(byte[] video) {
		jniCallback.onCallBackRecvFrameListened(video);
	}

}
